<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\parkDisplayMap\validate;

use think\Validate;

/**
 * 园区展示图验证器
 */
class parkDisplayMapValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'display_image_path' => 'require',
        'display_map_name' => 'require',
        'lang_code' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'display_image_path' => '展示图片的存储路径必须填写',
        'display_map_name' => '展示图名称必须填写',
        'lang_code' => '语言类型，如中文、英文等必须填写'
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'display_image_path',
            'display_map_name',
            'lang_code'
        ],
        'update' => [
            'display_image_path',
            'display_map_name',
            'lang_code'
        ],
    ];

}
